package com.hbzhit.modules.sys.controller;

import com.hbzhit.common.utils.PageUtils;
import com.hbzhit.common.utils.R;
import com.hbzhit.modules.sys.entity.SysLogEntity;
import com.hbzhit.modules.sys.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


/**
 * 系统日志
 *
 * @author Mark sunlightcs@gmail.com
 */
@Api(tags = {"系统日志"})
@RestController
@RequestMapping("/sys/log")
public class SysLogController {
	@Autowired
	private SysLogService sysLogService;

	/**
	 * 列表
	 */
	@ApiOperation(value = "查询分页数据")
	@GetMapping("/list")
	@RequiresPermissions("sys:log:list")
	public R<PageUtils<SysLogEntity>> list(@RequestParam Map<String, Object> params){
		PageUtils<SysLogEntity> page = sysLogService.queryPage(params);

		return R.ok(page);
	}

}
